Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-rev-list(1) |
| 2 | =============== |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-rev-list - Lists commit objects in reverse chronological order |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 12 | 'git-rev-list' [ \--max-count=number ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 13 | [ \--max-age=timestamp ] |
| 14 | [ \--min-age=timestamp ] |
| 15 | [ \--sparse ] |
| 16 | [ \--no-merges ] |
Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 17 | [ \--remove-empty ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 18 | [ \--all ] |
Junio C Hamano | decf50e | 2006-03-05 10:51:14 | [diff] [blame] | 19 | [ \--topo-order ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 20 | [ \--parents ] |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 21 | [ [\--objects | \--objects-edge] [ \--unpacked ] ] |
Junio C Hamano | 235a91e | 2006-01-07 01:13:58 | [diff] [blame] | 22 | [ \--pretty | \--header ] |
| 23 | [ \--bisect ] |
| 24 | <commit>... [ \-- <paths>... ] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 25 | |
| 26 | DESCRIPTION |
| 27 | ----------- |
| 28 | Lists commit objects in reverse chronological order starting at the |
| 29 | given commit(s), taking ancestry relationship into account. This is |
| 30 | useful to produce human-readable log output. |
| 31 | |
| 32 | Commits which are stated with a preceding '{caret}' cause listing to stop at |
| 33 | that point. Their parents are implied. "git-rev-list foo bar {caret}baz" thus |
| 34 | means "list all the commits which are included in 'foo' and 'bar', but |
| 35 | not in 'baz'". |
| 36 | |
| 37 | A special notation <commit1>..<commit2> can be used as a |
| 38 | short-hand for {caret}<commit1> <commit2>. |
| 39 | |
| 40 | |
| 41 | OPTIONS |
| 42 | ------- |
| 43 | --pretty:: |
| 44 | Print the contents of the commit changesets in human-readable form. |
| 45 | |
| 46 | --header:: |
| 47 | Print the contents of the commit in raw-format; each |
| 48 | record is separated with a NUL character. |
| 49 | |
| 50 | --objects:: |
| 51 | Print the object IDs of any object referenced by the listed commits. |
| 52 | 'git-rev-list --objects foo ^bar' thus means "send me all object IDs |
| 53 | which I need to download if I have the commit object 'bar', but |
| 54 | not 'foo'". |
| 55 | |
Junio C Hamano | 5f32776 | 2006-03-02 09:14:51 | [diff] [blame] | 56 | --objects-edge:: |
| 57 | Similar to `--objects`, but also print the IDs of |
| 58 | excluded commits refixed with a `-` character. This is |
| 59 | used by `git-pack-objects` to build 'thin' pack, which |
| 60 | records objects in deltified form based on objects |
| 61 | contained in these excluded commits to reduce network |
| 62 | traffic. |
| 63 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 64 | --unpacked:: |
| 65 | Only useful with `--objects`; print the object IDs that |
| 66 | are not in packs. |
| 67 | |
| 68 | --bisect:: |
| 69 | Limit output to the one commit object which is roughly halfway |
| 70 | between the included and excluded commits. Thus, if 'git-rev-list |
Junio C Hamano | b0ec2db | 2006-05-09 00:32:32 | [diff] [blame] | 71 | --bisect foo {caret}bar {caret}baz' outputs 'midpoint', the output |
| 72 | of 'git-rev-list foo {caret}midpoint' and 'git-rev-list midpoint |
| 73 | {caret}bar {caret}baz' would be of roughly the same length. |
| 74 | Finding the change |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 75 | which introduces a regression is thus reduced to a binary search: |
| 76 | repeatedly generate and test new 'midpoint's until the commit chain |
| 77 | is of length one. |
| 78 | |
| 79 | --max-count:: |
| 80 | Limit the number of commits output. |
| 81 | |
| 82 | --max-age=timestamp, --min-age=timestamp:: |
| 83 | Limit the commits output to specified time range. |
| 84 | |
| 85 | --sparse:: |
| 86 | When optional paths are given, the command outputs only |
| 87 | the commits that changes at least one of them, and also |
| 88 | ignores merges that do not touch the given paths. This |
| 89 | flag makes the command output all eligible commits |
| 90 | (still subject to count and age limitation), but apply |
| 91 | merge simplification nevertheless. |
| 92 | |
Junio C Hamano | 9be1897 | 2006-01-28 08:54:57 | [diff] [blame] | 93 | --remove-empty:: |
| 94 | Stop when a given path disappears from the tree. |
| 95 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 96 | --all:: |
| 97 | Pretend as if all the refs in `$GIT_DIR/refs/` are |
| 98 | listed on the command line as <commit>. |
| 99 | |
| 100 | --topo-order:: |
| 101 | By default, the commits are shown in reverse |
| 102 | chronological order. This option makes them appear in |
| 103 | topological order (i.e. descendant commits are shown |
| 104 | before their parents). |
| 105 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 106 | Author |
| 107 | ------ |
| 108 | Written by Linus Torvalds <torvalds@osdl.org> |
| 109 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 110 | Documentation |
| 111 | -------------- |
| 112 | Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 113 | |
| 114 | GIT |
| 115 | --- |
| 116 | Part of the gitlink:git[7] suite |
| 117 | |